<?xml version="1.0" encoding="utf-8"?>

<openerp>
	<data>
		<record id="view_param_gl_report" model="ir.ui.view">
			<field name="name">General Ledger Report</field>
			<field name="model">param.gl.report</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="General Ledger Report">
					<group>
						<group string="">
							<field name="target_move"/> 
                   		</group>
						<notebook tabpos="up" colspan="4">
							<page string="Account No">
								<group>
									<field name="account_search_vals"/>
									<field name="account_selection"/>
									<field name="account_default_from" attrs="{'invisible': [('account_selection','!=','def')], 'required': [('account_selection','=','def')]}"/>
									<field name="account_default_to" attrs="{'invisible': [('account_selection','!=','def')], 'required': [('account_selection','=','def')]}"/>
									<field name="account_input_from"
										attrs="{'invisible': [('account_selection','!=','input')], 'required': [('account_selection','=','input')]}"/>
									<field name="account_input_to"
										attrs="{'invisible': [('account_selection','!=','input')], 'required': [('account_selection','=','input')]}"/>
								</group>
								<field name="account_ids"
										attrs="{'invisible': [('account_selection','!=','selection')], 'required': [('account_selection','=','selection')]}" nolabel="1">
										<tree>
											<field name="name"/>
										</tree>
								</field>
								
							</page>
							<page string="Date">
								<group>
									<field name="date_selection" on_change="onchange_date_selection(date_selection)"/>
									<field name="date_from" attrs="{'invisible': [('date_selection','!=','date_sel')], 'required': [('date_selection','=','date_sel')]}"/>
									<field name="date_to" attrs="{'invisible': [('date_selection','!=','date_sel')], 'required': [('date_selection','=','date_sel')]}"/>
									<field name="period_filter_selection" attrs="{'invisible': [('date_selection','!=','period_sel')], 'required': [('date_selection','=','period_sel')]}"/>
									<field name="period_default_from"
										attrs="{'invisible': ['|', ('date_selection','!=','period_sel'), ('period_filter_selection','!=','def')], 'required': [('date_selection','=','period_sel'),('period_filter_selection','=','def')]}"/>
									<field name="period_default_to"
										attrs="{'invisible': ['|', ('date_selection','!=','period_sel'),('period_filter_selection','!=','def')], 'required': [('date_selection','=','period_sel'),('period_filter_selection','=','def')]}"/>
									<field name="period_input_from"
										attrs="{'invisible': ['|', ('date_selection','!=','period_sel'),('period_filter_selection','!=','input')], 'required': [('date_selection','=','period_sel'),('period_filter_selection','=','input')]}"/>
									<field name="period_input_to"
										attrs="{'invisible': ['|',('date_selection','!=','period_sel'),('period_filter_selection','!=','input')], 'required': [('date_selection','=','period_sel'),('period_filter_selection','=','input')]}"/>
								</group>
							</page> 
						</notebook>
					</group>
					<footer>
						<button name="create_vat" string="Print as PDF" type="object" default_focus="1" class="oe_highlight"/>
	                    or
	                    <button name="print_report" string="Print as XLS" type="object" class="oe_highlight" context="{'xls_output':1}"/>
		            	or
	                    <button string="Cancel" class="oe_link" special="cancel"/>
					</footer>					
				</form>
			</field>
		</record>
		
		<record id="param_gl_result_data_view" model="ir.ui.view">
			<field name="name">General Ledger Report</field>
			<field name="model">param.gl.report</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="Report Options">
					<field name="data" filename="filename" colspan="4" readonly="1"/>
					<field name="filename" invisible="1"/>
					<group>
						<button string="Cancel" class="oe_link" special="cancel"/>
					</group>
				</form>
			</field>
		</record>
		
		<record id="action_param_gl_report" model="ir.actions.act_window">
			<field name="name">General Ledger</field>
			<field name="type">ir.actions.act_window</field>
			<field name="res_model">param.gl.report</field>
			<field name="view_type">form</field>
			<field name="view_mode">form</field>
			<field name="view_id" ref="view_param_gl_report"/>
			<field name="target">new</field>
		</record>

		<menuitem name="General Ledger" parent="menu_general_report"
			action="action_param_gl_report" id="menu_general_ledger" sequence="20"/>

		<!--menuitem icon="STOCK_PRINT" name="General Ledger" parent="maxmega_reports.menu_maxmega_account_general_report"
			action="action_maxmega_gl_menu" id="menu_maxmega_general_gl_report" /-->


	</data>
</openerp>
